using System;
using CodePlex.DnD4eCampaignManager.DnD4e;
using CodePlex.DnD4eCampaignManager.DnD4e.Interfaces;
using NUnit.Framework;

namespace CodePlex.DnD4eCampaignManager.CampaignManagerTests.DnD4eTests
{
    [TestFixture]
    public class DefensesTests
    {
        [Test]
        public void HasDefensesArmorClass()
        {
            const int armorClass = 20;
            Defenses defenses = new Defenses { DefenseArmorClass = armorClass };
            Assert.AreEqual(armorClass, defenses.DefenseArmorClass);
        }

        [Test]
        public void HasDefensesFortitude()
        {
            const int fortitude = 20;
            Defenses defenses = new Defenses { DefenseFortitude = fortitude };
            Assert.AreEqual(fortitude, defenses.DefenseFortitude);
        }

        [Test]
        public void HasDefensesReflex()
        {
            const int reflex = 20;
            Defenses defenses = new Defenses { DefenseReflex = reflex };
            Assert.AreEqual(reflex, defenses.DefenseReflex);
        }

        [Test]
        public void HasDefensesWillpower()
        {
            const int armorClass = 20;
            Defenses defenses = new Defenses { DefenseWillpower = armorClass };
            Assert.AreEqual(armorClass, defenses.DefenseWillpower);
        }

        [Test]
        public void ImplementsIAbilities()
        {
            Assert.IsInstanceOfType(typeof ( IDefenses ), new Defenses());
        }

        [Test]
        public void ImplementsIEquatable()
        {
            Assert.IsInstanceOfType(typeof ( IEquatable<Defenses> ), new Defenses());
        }
    }
}